#ifndef MotorControl_H
#define MotorControl_H

#include "Arduino.h"

class MotorControl { 
public:
	MotorControl(int enable1, int phase1, int enable2, int phase2, int mode);
	~MotorControl();
	void setDriveSpeed(int speed);
	void drive(bool forward);
    void drive(bool forward, int accelTime);
	void stopMotors();
	void stopMotors(int stopTime);
	void setTurnTime(double time);
	void setTurnSpeed(int speed);
	void turn(bool left);
	void turn(bool left, double angle);
private:
	void setDriveDirection(bool forward);

	int _enablePin1;
	int _phasePin1;
	int _enablePin2;
	int _phasePin2;
	int _modePin;
	
	long _turnTime180;
	int _driveSpeed;
	int _turnSpeed;
};

#endif
